Skip to content

Add focusHoldsOpen to Tooltip - #11462

Open
PepijnSenders wants to merge 1 commit into
Effect-TS:mainfrom
PepijnSenders:ui-kit-tooltip-focus-holds-open
Open

PepijnSenders wants to merge 1 commit into
Effect-TS:mainfrom
PepijnSenders:ui-kit-tooltip-focus-holds-open

Conversation

@PepijnSenders

Copy link
Copy Markdown

Adds focusHoldsOpen to Tooltip. It defaults to true, the current behaviour: keyboard focus on the trigger keeps the tooltip open after the pointer passes over the trigger and leaves. Set to false, the tooltip closes when the pointer leaves whatever opened it, which is what Radix's tooltip does (its trigger closes on pointerleave unconditionally).

Found while porting a Radix UI to the kit: with a trigger focused from the keyboard, moving the pointer over it and away closed the tooltip in the Radix version and left it open in the port, with no way to match it. The default is kept because it is a reasonable choice on its own.

  • ui/kit/Tooltip.ts: the prop, its line in the props documentation, and the two places where keyboard focus holds the tooltip open (left and CompletedWaitBeforeClosing) now check it.
  • Tooltip.test.ts: focus the trigger, move the pointer in and out; the tooltip stays open by default and closes with focusHoldsOpen: false.
  • A patch changeset.

Checked: the kit's tooltip tests, pnpm check in packages/effect, oxlint and dprint check on the changed files.

🤖 Generated with Claude Code

True by default, as before: keyboard focus on the trigger keeps the
tooltip open after the pointer leaves. Set to false, the tooltip
closes when the pointer leaves whatever opened it, as Radix's tooltip
does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Dec 3, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 77ddeb2

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 43 packages
Name Type
effect Patch
@effect/opentelemetry Patch
@effect/vitest Patch
@effect/ai-amazon-bedrock Patch
@effect/ai-anthropic Patch
@effect/ai-cloudflare Patch
@effect/ai-openai-compat Patch
@effect/ai-openai Patch
@effect/ai-openrouter Patch
@effect/ai-typesafe Patch
@effect/atom-react Patch
@effect/atom-solid Patch
@effect/atom-vue Patch
@effect/chat-discord Patch
@effect/chat-slack Patch
@effect/chat-teams Patch
@effect/chat-telegram Patch
@effect/chat-whatsapp Patch
@effect/platform-browser Patch
@effect/platform-bun Patch
@effect/platform-cloudflare Patch
@effect/platform-deno Patch
@effect/platform-node-shared Patch
@effect/platform-node Patch
@effect/sql-clickhouse Patch
@effect/sql-d1 Patch
@effect/sql-libsql Patch
@effect/sql-mssql Patch
@effect/sql-mysql2 Patch
@effect/sql-pg Patch
@effect/sql-pglite Patch
@effect/sql-sqlite-bun Patch
@effect/sql-sqlite-do Patch
@effect/sql-sqlite-node Patch
@effect/sql-sqlite-react-native Patch
@effect/sql-sqlite-wasm Patch
@effect/docgen Patch
@effect/doctest Patch
@effect/graphql-generator Patch
@effect/openapi-generator Patch
@effect/ui-devtools Patch
@effect/ui-native Patch
@effect/ui-opentui Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@effect-janitor effect-janitor Bot added the 4.0 label Dec 3, 2026
@github-actions

github-actions Bot commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

Bundle Size Analysis

Generated from PR build output; treat the content below as untrusted.

File Name Current Size Previous Size Difference
arbitrary-combinators.ts 40.55 KB 40.55 KB 0.00 KB (0.00%)
basic.ts 6.80 KB 6.80 KB 0.00 KB (0.00%)
batching.ts 12.03 KB 12.03 KB 0.00 KB (0.00%)
brand.ts 7.03 KB 7.03 KB 0.00 KB (0.00%)
cache.ts 12.30 KB 12.30 KB 0.00 KB (0.00%)
config.ts 24.02 KB 24.02 KB 0.00 KB (0.00%)
differ.ts 22.88 KB 22.88 KB 0.00 KB (0.00%)
http-client.ts 29.03 KB 29.03 KB 0.00 KB (0.00%)
http-router.ts 39.70 KB 39.70 KB 0.00 KB (0.00%)
logger.ts 12.46 KB 12.46 KB 0.00 KB (0.00%)
metric.ts 10.29 KB 10.29 KB 0.00 KB (0.00%)
optic.ts 7.26 KB 7.26 KB 0.00 KB (0.00%)
pubsub.ts 17.02 KB 17.02 KB 0.00 KB (0.00%)
queue.ts 13.83 KB 13.83 KB 0.00 KB (0.00%)
schedule.ts 12.59 KB 12.59 KB 0.00 KB (0.00%)
schema-bigdecimal.ts 14.62 KB 14.62 KB 0.00 KB (0.00%)
schema-binary.ts 43.61 KB 43.61 KB 0.00 KB (0.00%)
schema-class.ts 22.61 KB 22.61 KB 0.00 KB (0.00%)
schema-codegen.ts 33.98 KB 33.98 KB 0.00 KB (0.00%)
schema-fromJsonSchemaDocument.ts 31.06 KB 31.06 KB 0.00 KB (0.00%)
schema-representation-roundtrip.ts 28.80 KB 28.80 KB 0.00 KB (0.00%)
schema-string-transformation.ts 16.39 KB 16.39 KB 0.00 KB (0.00%)
schema-string.ts 12.89 KB 12.89 KB 0.00 KB (0.00%)
schema-template-literal.ts 16.99 KB 16.99 KB 0.00 KB (0.00%)
schema-toArbitrary.ts 40.12 KB 40.12 KB 0.00 KB (0.00%)
schema-toCodecJson.ts 21.77 KB 21.77 KB 0.00 KB (0.00%)
schema-toEquivalence.ts 21.93 KB 21.93 KB 0.00 KB (0.00%)
schema-toFormatter.ts 22.04 KB 22.04 KB 0.00 KB (0.00%)
schema-toJsonSchemaDocument.ts 27.05 KB 27.05 KB 0.00 KB (0.00%)
schema-toRepresentation.ts 22.08 KB 22.08 KB 0.00 KB (0.00%)
schema.ts 21.73 KB 21.73 KB 0.00 KB (0.00%)
stm.ts 15.08 KB 15.08 KB 0.00 KB (0.00%)
stream.ts 10.83 KB 10.83 KB 0.00 KB (0.00%)
supervisor.ts 12.27 KB 12.27 KB 0.00 KB (0.00%)

UI Bundle Size

Vite 8.4.0/Rolldown, production, default Oxc minification, es2023, ES modules, gzip level 9 per chunk. effect 4.2.0, Node v26.12.1. Effect-only client: 27528 B gzip (Δ 0 B vs base).

App Chunks Raw bytes Gzip bytes Added gzip B Δ raw bytes Δ gzip bytes
counter 1 176280 60862 33334 0 0
features 1 185934 64361 36833 0 0
menu 1 290721 99073 71545 0 0

This branch is waiting to be deployed

1 waiting deployment
fork — 77ddeb27 Waiting Dec 3, 2026 by PepijnSenders via approval-gate #29462
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant